<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for循环</title>
</head>
<body>
<script type="text/javascript">
  //5.2.3 for循环
  //打印9x9乘法表
  var list = '';
  for(var i=1; i<=9; i++) {
    for(var j=1; j<=i; j++) {
      list += j + 'x' + i + '=' + i*j + '\t';
    }
    list += '\n';
  }
  console.log(list);
</script>
</body>
</html>